package org.rjxh.examfront.comtroller;

import org.rjxh.examfront.pojo.CodeRequest;
import org.rjxh.examfront.pojo.R;
import org.rjxh.examfront.service.ICodeRunService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class CodeRun {

    @Resource
    private ICodeRunService codeRunService;
    @PostMapping("/codeRun")
    public R codeRun(@RequestBody CodeRequest codeRequest) {
        return codeRunService.codeRun(codeRequest);
    }
}
